{% extends 'index.html' %}
{% load staticfiles %}
{% block title %}这是用户主页{% endblock %}
{% block context %}

    <div class="container">
        <div class="row">
            <div class="col-xs-offset-1 col-xs-8">
                <h1>这是用户主页</h1>
            </div>
        </div>
        <div class="row">
            <div class="col-xs-offset-1 col-xs-8">
                <h3>已创建的文件接收柜</h3>
            </div>
        </div>

     <div class="col-xs-offset-1 col-xs-8">
        {% for project in projects %}
            <div class="input-group input-group">
                <span class="input-group-addon"><a href="{% url 'count' %}?ppid={{ project.ppid }}">查看详情</a></span>
                <a href="{% url 'upload' %}?user={{ project.user }}&ppid={{ project.ppid }}" class="list-group-item"><span class="badge">{{ project.filelist_set.all.count }}</span>{{ project.projectname }}</a>
            </div>
        {% endfor %}
     </div>

        <div class="row">
            <div class="col-xs-offset-1 col-xs-6">
                <a href="{% url 'setFileName' %}?user={{ user }}" class="btn btn-primary">开始创建文件接收柜!</a>
            </div>
        </div>
    </div>



{% endblock %}